package org.dromara.oce.domain.dto;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 巨量广告主每日消耗记录表  --  返回实体
 */
@ExcelIgnoreUnannotated
@Data
@Slf4j
public class OceAdvertiserEverydayCostDTO implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 巨量广告主每日消耗记录id
     */
    private Long advertiserCostId;
    /**
     * 第三方广告主id
     */
    @ExcelProperty(value = "广告主id")
    private String thirdAdvertiserId;

    /**
     * 广告主账户名
     */
    @ExcelProperty(value = "广告主账户名")
    private String thirdAdvertiserName;

    /**
     * 推广链接id
     */
    @ExcelProperty(value = "推广链接id")
    private String referralLinkId;
    /**
     * 短剧名称
     */
    @ExcelProperty(value = "短剧名称")
    private String dramaTitle;
    /**
     * 推广链接类型：1-袋鼠；2-番茄；3-点众；4-番茄IAA；5-袋鼠IAA；6-端原生IAP；7-端原生IAA；
     */
    private Integer referralLinkType;
    /**
     * 推广链接类型：1-袋鼠；2-番茄；3-点众；4-番茄IAA；5-袋鼠IAA；6-端原生IAP；7-端原生IAA；
     */
    @ExcelProperty(value = "推广链接类型")
    private String referralLinkTypeDesc;
    /**
     * 投手名称
     */
    @ExcelProperty(value = "投手")
    private String createName;
    /**
     * 推广名称
     */
    private String referralLinkName;

    /**
     * 当日时间戳
     */
    private Long thatdayTimestamp;
    /**
     * 当日日期
     */
    @ExcelProperty(value = "当日日期")
    private String thatdayDate;
    /**
     * 总消耗
     */
    @ExcelProperty(value = "总消耗")
    private BigDecimal cost;
    /**
     * 消耗时速
     */
    @ExcelProperty(value = "时速")
    private BigDecimal costHoursSpeed;
    /**
     * 当日总收入
     */
//    @ExcelProperty(value = "当日充值")
    private BigDecimal thatdayTotalAmount;
    /**
     * 当日注册用户的总收入
     */
    @ExcelProperty(value = "充值")
    private BigDecimal thatdayRegisterTotalAmount = BigDecimal.ZERO;
    /**
     * 当日注册用户的分成金额
     */
    @ExcelProperty(value = "分成金额")
    private BigDecimal thatdayRegisterDividendAmount = BigDecimal.ZERO;
    /**
     * 当日分成金额
     */
//    @ExcelProperty(value = "当日分成金额")
    private BigDecimal thatdayDividendAmount;
    /**
     * 当日利润金额=当日分成金额-当日消耗
     */
    private BigDecimal thatdayProfitAmount;
    /**
     * 当日注册用户的利润金额
     */
    @ExcelProperty(value = "利润")
    private BigDecimal thatdayRegisterProfitAmount = BigDecimal.ZERO;

    /**
     * 当日IAA总收入
     */
    private BigDecimal iaaTotalAmount = BigDecimal.ZERO;
    /**
     * 当日IAA分成金额
     */
    private BigDecimal iaaDividendAmount = BigDecimal.ZERO;

//	@ApiModelProperty(value = "当日IAA利润金额")
//	private BigDecimal iaaProfitAmount = BigDecimal.ZERO;
    /**
     * 当日注册用户的IAA总收入
     */
    @ExcelProperty(value = "广告收入")
    private BigDecimal iaaRegisterTotalAmount = BigDecimal.ZERO;
    /**
     * 当日注册用户的IAA分成金额
     */
    @ExcelProperty(value = "广告分成")
    private BigDecimal iaaRegisterDividendAmount = BigDecimal.ZERO;


    /**
     * 回本率
     * IAP回本率 = 总分成金额 / 总消耗金额
     * IAA回本率=（总分成金额+广告总分成金额）/总消耗金额
     */
//    @ExcelProperty(value = "回本率")
    private BigDecimal extRecoveryRate = BigDecimal.ZERO;

    /**
     * 新增回本率
     * 新增回本率 = （总新增分成金额+广告总新增分成金额）/总消耗金额
     */
    @ExcelProperty(value = "回本率")
    private BigDecimal extRegisterRecoveryRate = BigDecimal.ZERO;
    /**
     * 平均千次展现费用=总花费/展示数*1000
     */
    @ExcelProperty(value = "千展成本")
    private BigDecimal avgShowCost;
    /**
     * 展示数
     */
    @ExcelProperty(value = "展示数")
    private Integer show;
    /**
     * 点击数
     */
    @ExcelProperty(value = "点击数")
    private Integer click;
    /**
     * 平均点击单价=总花费/点击数
     */
    @ExcelProperty(value = "点击成本")
    private BigDecimal avgClickCost;
    /**
     * 点击率=点击数/展示数*100%
     */
    @ExcelProperty(value = "点击率")
    private BigDecimal ctr;
    /**
     * 转化数=付费数*回传率
     */
    @ExcelProperty(value = "转化数")
    private Integer convert;
    /**
     * 转化成本
     */
    @ExcelProperty(value = "转化成本")
    private BigDecimal convertCost;
    /**
     * 转化率=转化数/点击数*100%
     */
    @ExcelProperty(value = "转化率")
    private BigDecimal convertRate;
    /**
     * 当日付款人数
     */
    @ExcelProperty(value = "付费人数")
    private Integer thatdayPaidUseNum;
    /**
     * 激活数
     */
    private Integer active;
    /**
     * 激活成本=总消耗/激活数
     */
    private BigDecimal activeCost;
    /**
     * 激活率=激活数/点击数*100%
     */
    private BigDecimal activeRate;
    /**
     * 首次付费数
     */
    private Integer activePay;
    /**
     * 首次付费成本=消耗/付费次数
     */
    private BigDecimal activePayCost;
    /**
     * 首次付费率=首次付费数/激活数
     */
    private BigDecimal activePayRate;
    /**
     * 付费次数
     */
    @ExcelProperty(value = "付费次数")
    private Integer gamePayCount;
    /**
     * 付费成本=消耗/付费次数
     */
    @ExcelProperty(value = "付费成本")
    private BigDecimal gamePayCost;
    /**
     * 当日总支付笔数
     */
    private Integer thatdayPaidTotalNum;

    /**
     * 客单价
     * IAP客单价 = 当日充值分成金额 / 付费人数
     * IAA客单价 = 当日广告分成 / 激活数
     */
    @ExcelProperty(value = "客单价")
    private BigDecimal extAvgPrice = BigDecimal.ZERO;

    /**
     * 付费成本
     * IAP付费成本 = 消耗 / 付费人数
     * IAA付费成本 = 消耗 / 激活数
     */
    private BigDecimal extPayCost = BigDecimal.ZERO;

    /**
     * 回传率
     * 回传率 = 转化数 / 当日付款人数
     */
    @ExcelProperty(value = "回传率")
    private BigDecimal returnRate = BigDecimal.ZERO;

    /**
     * 激励点击金额，单位千分之一元
     */
    private BigDecimal ecpmCost = BigDecimal.ZERO;
    /**
     * 观看广告次数
     */
    private BigDecimal advertNum = BigDecimal.ZERO;
    /**
     * 平均ecpm = 激励金额/观看广告次数
     */
    private BigDecimal avgEcpm = BigDecimal.ZERO;
    /**
     * 最大ecpm
     */
    private BigDecimal maxEcpm = BigDecimal.ZERO;

    /**
     * 当日LTV
     */
    @ExcelProperty(value = "当日LTV")
    private BigDecimal attributionMicroGame0dLtv = BigDecimal.ZERO;

    /**
     * 当日广告变现ROI
     */
    private BigDecimal attributionMicroGame0dRoi = BigDecimal.ZERO;

    //商务当日分成金额
    private BigDecimal thatdayDividendAmountSw = BigDecimal.ZERO;
    //商务当日IAA分成金额
    private BigDecimal iaaDividendAmountSw = BigDecimal.ZERO;
    //商务当日利润金额=商务当日分成金额-当日消耗/1.015
    private BigDecimal thatdayProfitAmountSw = BigDecimal.ZERO;

}
